<?php
$kodikos = Globals::perastike_must("kodikos");
$skodikos = Globals::asfales_sql($kodikos);

$query = "UPDATE `pektis` SET `onoma` = " . $sonoma . ", `email` = " . $semail;

if (Globals::perastike("kodikos1") && ($_REQUEST["kodikos1"] !== "")) {
	if (Globals::perastike_must("kodikos2") != $kodikos1) Globals::klise_fige("διαφορετικοί κωδικοί");

	$skodikos1 = Globals::asfales_sql($kodikos1);
	$query .= ", `kodikos` = " . $skodikos1;
}

$query .= " WHERE (`login` = BINARY " . $slogin . ") AND (`kodikos` = BINARY " . $skodikos . ")";

Globals::query($query);
if (Globals::affected_rows() != 1) Globals::klise_fige("Η ενημέρωση απέτυχε");
?>
